<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active">
            <if condition="$strats == 1 ">
                <a href="">消费列表</a>
            <else>
                <a href="{:url('AdminOrder/index')}">工单列表</a>
            </if></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('AdminOrder/mdorderlist')}">
        服务机构名称:
        <input type="text" class="form-control" name="mdname" style="width: 200px;"
               value="{$mdname|default=''}" placeholder="服务机构名称">
        <button class="btn btn-primary">搜索</button>
    </form>
    <form class="js-ajax-form" method="post">
        <!-- <div class="table-actions">
            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" data-action="{:url('AdminPage/delete')}"
                    data-subcheck="true" data-msg="{:lang('DELETE_CONFIRM_MESSAGE')}">{:lang('DELETE')}
            </button>
        </div> -->
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="16">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="80">序号</th>
                <th width="100">工单编号</th>
                <th width="100">老人姓名</th>
                <th width="160">老人联系方式</th>
                <th width="160">服务类型</th>
                <th width="160">消费金额</th>
                <th width="160">服务机构</th>
                <th width="120">服务员姓名</th>
                <th width="200">服务员电话</th>
                <th width="160">录单人ID</th>
                <th width="200">录单时间</th>
                <th width="80">状态</th>
                <th width="200">操作</th>
            </tr>
            </thead>
            <php>$status=array("1"=>'已发布',"0"=>'未发布');</php>
            <foreach name="pages" item="vo">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}">
                    </td>
                    <td>{$xhpage + $key}</td>
                    <td>{$vo.post_source}</td>
                    <td>
                        {$vo.post_title}
                    </td>
                    <td>{$vo.more.tel|default=''}</td>
                    
                    <td>{$vo.post_keywords|default=''}</td>
                    <td>{$vo.money}</td>
                    <td>{$vo.more.mendian|default=''}</td>
                    <td>{$vo.more.mendianfwy|default=''}</td>
                    <td>{$vo.more.mendianfwytel|default=''}</td>
                    <td>{$vo.user_id}</td>
                    <td>
                        <empty name="vo.published_time">
                            未发布
                            <else/>
                            {:date('Y-m-d H:i',$vo['published_time'])}
                        </empty>
                    </td>
                    <td>
                        {$vo.gdstatus}
                    </td>
                    <td>
                        
                        <if condition="$vo.gdstatus == '已录单' ">
                        <a class="btn btn-xs btn-primary" href="{:url('AdminOrder/edit',array('id'=>$vo['id']))}">编辑</a>
                        <a class="btn btn-xs btn-primary" href="{:url('AdminOrder/paidan',array('id'=>$vo['id']))}">派单</a>
                        
                        <elseif condition="$vo.gdstatus == '待接单' or $vo.gdstatus == '已拒单' ">
                            <a class="btn btn-xs btn-primary" href="{:url('AdminOrder/paidan',array('id'=>$vo['id'],'ck'=>1))}">查看</a>
                            <a class="btn btn-xs btn-primary" href="{:url('AdminOrder/paidan',array('id'=>$vo['id']))}">重新派单</a>
                        
                        <elseif condition="$vo.gdstatus == '待审核' ">
                            <a class="btn btn-xs btn-primary" href="{:url('AdminOrder/shenhe',array('id'=>$vo['id']))}">审核</a>
                       
                        <elseif condition="$vo.gdstatus == '已退款' ">
                            <a class="btn btn-xs btn-primary" href="{:url('AdminOrder/paidan',array('id'=>$vo['id']))}">重新派单</a>
                        <else>
                            <a class="btn btn-xs btn-primary" href="{:url('AdminOrder/shenhe',array('id'=>$vo['id'],'ck'=>1))}">查看</a>
                        </if>
                        <!-- <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('AdminOrder/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a> -->
                        <!-- <if condition="$vo.gdstatus != '已退款' ">
                            <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('AdminOrder/tuikuanPost',array('id'=>$vo['id']))}"
                                data-msg="确定退款吗？">退款</a>
                        </if> -->
                        
                    </td>
                </tr>
            </foreach>
            <tfoot>
            <!-- <tr>
                <th width="16">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="100">工单ID</th>
                <th width="100">老人姓名</th>
                <th width="160">老人联系方式</th>
                <th width="160">家政服务项目</th>
                <th width="160">消费金额</th>
                <th width="160">门店</th>
                <th width="120">服务员姓名</th>
                <th width="200">服务员电话</th>
                <th width="160">录单人ID</th>
                <th width="200">录单时间</th>
                <th width="80">状态</th>
                <th width="200">操作</th>
            </tr>
            </tfoot> -->
        </table>
        <!-- <div class="table-actions">
            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" data-action="{:url('AdminPage/delete')}"
                    data-subcheck="true" data-msg="你确定删除吗？">{:lang('DELETE')}
            </button>
        </div> -->
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>